﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Register.aspx.cs" Inherits="GNSWebSite.Pages.Register"
    MasterPageFile="~/MasterPages/Main.Master" %>

<%@ Register Src="../Controls/PlaceOnLiveMap.ascx" TagName="PlaceOnLiveMap" TagPrefix="uc1" %>
<%@ Register Src="../Controls/RegisterSettings.ascx" TagName="RegisterSettings" TagPrefix="uc2" %>
<%@ Register Assembly="MSCaptcha" Namespace="MSCaptcha" TagPrefix="сaptcha" %>
<asp:Content ContentPlaceHolderID="cphMainContent" runat="server">
    <div>
        <asp:MultiView ID="mvRegistration" runat="server" ActiveViewIndex="0">
            <asp:View runat="server" ID="viewCreateUser">
                <div>
                    <asp:CreateUserWizard ID="cuwGNS" runat="server" OnCreatedUser="cuwGNS_CreatedUser" OnCreatingUser="cuwGNS_UserCreating"
                        AutoGeneratePassword="True" DisableCreatedUser="True"
                        LoginCreatedUser="False" meta:resourcekey="cuwGNS">
                        <WizardSteps>
                            <asp:CreateUserWizardStep ID="CreateStep" runat="server">
                                <ContentTemplate>
                                    <table border="0">
                                        <tr>
                                            <td align="center" colspan="2">
                                                <asp:Label ID="lblSignup" runat="server" meta:resourcekey="lblSignup"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Label ID="UserNameLabel" runat="server" meta:resourcekey="UserName"></asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="UserName" runat="server"></asp:TextBox>
                                            </td>
                                            <td>
                                                <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
                                                 ValidationGroup="cuwGNS" meta:resourcekey="UserNameRequired">*</asp:RequiredFieldValidator>

                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email" meta:resourcekey="EmailLabel"></asp:Label>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="Email" runat="server"></asp:TextBox>
                                              
                                            </td>
                                            <td>
                                              <asp:RequiredFieldValidator ID="EmailRequired" runat="server" meta:resourcekey="EmailRequired"
                                                    ControlToValidate="Email" ValidationGroup="cuwGNS">*</asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:Localize ID="lclCapthaLabel" runat="server" meta:resourcekey="lclCaptchaLabel"></asp:Localize>
                                            </td>
                                            <td>
                                                <сaptcha:CaptchaControl ID="ucNoBot" runat="server" CaptchaBackgroundNoise="High"
                                                    CaptchaLength="5" CaptchaHeight="50" CaptchaWidth="140" CaptchaLineNoise="High"
                                                    CaptchaMinTimeout="5" CaptchaMaxTimeout="240"/>
                                                <asp:RequiredFieldValidator ID="revCAPTCHA" runat="server" ControlToValidate="tbCAPTCHA"
                                                    meta:resourcekey="CAPTCHARequired" Display="Dynamic"/>
                                                <asp:CustomValidator ID="cvCAPTCHA" runat="server"
                                                    EnableClientScript="false" OnServerValidate="cvCAPTCHA_ServerValidate" meta:resourcekey="CAPTCHAInvalid"
                                                    Display="Dynamic" />
                                            </td>
                                            <td></td>
                                        </tr>
                                        <tr>
                                            <td>
                                                  <asp:Localize ID="lclCaptchaTextBox" runat="server" meta:resourcekey="lclCaptchaTextBox"></asp:Localize>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="tbCAPTCHA" runat="server" MaxLength="5"></asp:TextBox>
                                            </td>
                                            <td></td>
                                        </tr>
                                        <tr>
                                            <td align="center" colspan="2" style="color: Red;">
                                                <asp:Literal ID="ErrorMessage" runat="server" EnableViewState="False" meta:resourcekey="ErrorMessage"></asp:Literal>
                                            </td>
                                            <td></td>
                                            <td></td>
                                        </tr>
                                    </table>
                                </ContentTemplate>
                            </asp:CreateUserWizardStep>
                            <asp:CompleteWizardStep ID="CompleteStep" runat="server">
                            </asp:CompleteWizardStep>
                        </WizardSteps>
                    </asp:CreateUserWizard>
                </div>
            </asp:View>
            <asp:View runat="server" ID="viewPlaceOnMap">
                <uc1:PlaceOnLiveMap ID="ucPlaceOnLiveMap" runat="server" />
                <asp:Button ID="btnSaveUserPosition" runat="server" meta:resourcekey="btnSavePosition"
                    OnClick="btnSavePosition_Click" />
            </asp:View>
            <asp:View runat="server" ID="viewUserSettings">
                <h2>
                    <asp:Localize ID="locSaveSettings" runat="server" meta:resourcekey="locSaveSettings"></asp:Localize>
                </h2>
                <uc2:RegisterSettings ID="ucRegisterSettings" runat="server" />
        
                <asp:Button ID="btnSaveSettings" runat="server" meta:resourcekey="btnSaveSettings"
                    OnClick="btnSaveSettings_Click" />
            </asp:View>
        </asp:MultiView>
    </div>
</asp:Content>
